<?php

namespace App\Api\Traits;

use App\Api\Exceptions\BusinessException;


trait BusinessExceptionTrait
{
    /**
     * 业务异常返回
     * @param int $code
     * @param string $info
     * @throws BusinessException
     */
    public function throwBusinessException(int $code = 500, string $info = '')
    {
        throw new BusinessException($code, $info);
    }
}
